<template>
  <div class="splash-container">
    <fm-nav-bar title="启动页" :border="false" left-arrow @click-left="back" />
    <div class="image">
      <img
        style="object-fit: cover; border-radius: 8px"
        width="100%"
        height="100%"
        :src="require('@assets/img/plugin/splashscreen.png')"
      />
    </div>
    <div class="title">启动页效果展示</div>
  </div>
</template>
<script>
export default {
  name: 'SplashScreen',
  data() {
    return {}
  },
  methods: {
    back() {
      this.$router.go(-1)
    },
  },
  mounted() {
    if (typeof yuanchu != 'undefined') {
      const url = 'http://172.20.79.29:9528/api/sys-storage/download?f8s=3942d911596615aae76ff148d1152f36&fullfilename=startpage.png&sign=kPMRqSPeeSjH+r3VgKSqg5RcY+8=&ttl=180&uid=fawkes&ts=1661761587'
      yuanchu.splashScreen.setUrl({ url }) //设置启动页图片

      yuanchu.splashScreen.show() //显示启动页

      setTimeout(() => {
        yuanchu.splashScreen.hide() //隐藏启动页
      }, 3000)
    }
  },
}
</script>
<style lang="less" scoped>
.splash-container {
  height: 100%;
  background: #f2f3f5;
  .image {
    margin: 40px 40px;
    height: 80%;
  }
  .title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #b5b9be;
    line-height: 44px;
  }
}
</style>

